home *** CD-ROM | disk | FTP | other *** search
- 7-Jun-86 09:48:50-PDT,20228;000000000001
- Return-Path: <jdb@s1-c.arpa>
- Received: from s1-c.arpa by SUMEX-AIM.ARPA with TCP; Sat 7 Jun 86 09:48:39-PDT
- Received: by s1-c.arpa id AA12054; Sat, 7 Jun 86 09:48:24 PDT
- id AA12054; Sat, 7 Jun 86 09:48:24 PDT
- Date: Sat, 7 Jun 86 09:48:24 PDT
- From: John Bruner <jdb@s1-c.arpa>
- Message-Id: <8606071648.AA12054@s1-c.arpa>
- To: info-mac@sumex-aim.arpa
- Subject: Mac font to vfont (Sun screen) font converter
-
- "fontcvt" is a UNIX program I wrote one day while waiting for my hard disc
- to be repaired. It extracts FONT resources from a Macintosh resource file
- and creates font files in vfont format. These fonts can be used as Sun
- screen fonts. (Theoretically they could also be used as Versatec
- printer fonts, but the difference in resolution makes all but the largest
- Mac fonts too small for the Versatec.)
- --
- John Bruner (S-1 Project, Lawrence Livermore National Laboratory)
- MILNET: jdb@mordor [jdb@s1-c.ARPA] (415) 422-0758
- UUCP: ...!ucbvax!dual!mordor!jdb ...!seismo!mordor!jdb
- ---------------------------------------------------------------------------
- : This is a shar archive. Extract with sh, not csh.
- echo x - README
- sed -e 's/^X//' > README << '!EOF!README!'
- X"fontcvt" extracts resources of type "FONT" from Macintosh resource
- Xfiles and converts the fonts into (Sun) vfont format. (The header
- Xfile on Suns defines two constants which the 4.2BSD header file
- Xdoes not:
- X
- X #define VFONT_MAGIC 0436
- X #define NUM_DISPATCH 256
- X
- X) The resulting fonts can then be used with Sun Windows.
- X
- XThe source is divided into two files. "fontcvt.c" contains the
- Xactual font converter. "resmgr.c" is a quick-and-dirty library of
- Xroutines for (read-only) access to resource files.
- X
- XTo run the converter, upload the resource fork of a Macintosh font
- Xfile to the host. Execute the command
- X
- X $ fontcvt resourcefile
- X
- Xwhere "resourcefile" is the resource file. It will extract all
- XFONT resources and create files in the current directory with
- Xfilenames of the form "fontname.size", where "fontname" is the
- Xfont name (in lower-case with whitespace converted to underscores)
- Xand "size" is the point size.
- X
- XNOTE: Some Macintosh fonts are copyrighted, and others may be
- Xprotected by license agreements; hence, it may be illegal to use
- Xand/or distribute them in vfont format. "fontcvt" is intended for
- Xlegal use only.
- X
- X"fontcvt" tries to cope with byte-order issues, but it is unclear
- Xhow well it will work on a little-endian machine (e.g. a VAX). Also
- Xnote that byte order is an issue when vfont-format files are
- Xtransported between little-endian and big-endian machines. (The
- Xprogram "/usr/lib/vswap" on Suns can be used to perform the necessary
- Xconversion.)
- !EOF!README!
- echo x - Makefile
- sed -e 's/^X//' > Makefile << '!EOF!Makefile!'
- X#! /bin/make -f
- X
- XCFLAGS = -O
- X
- Xfontcvt: fontcvt.o resmgr.o
- X $(CC) $(CFLAGS) -o fontcvt fontcvt.o resmgr.o
- !EOF!Makefile!
- echo x - fontcvt.c
- sed -e 's/^X//' > fontcvt.c << '!EOF!fontcvt.c!'
- X/*
- X * fontcvt - convert Macintosh fonts to vfont format
- X */
- X
- X#include <sys/types.h>
- X#include <netinet/in.h>
- X#include <ctype.h>
- X#include <strings.h>
- X#include <vfont.h>
- X
- X#define SZ_VFHDR (5*sizeof(short))
- X
- Xextern char *malloc();
- Xextern char **getresource(), **getindresource();
- Xextern unsigned long sizeresource();
- X
- Xmain(argc, argv)
- Xchar **argv;
- X{
- X register int nfonts, index;
- X register char **res;
- X
- X if (argc != 2) {
- X (void)write(2, "Syntax: \"fontcvt rsrcfile\"\n", 27);
- X exit(1);
- X }
- X
- X if (openresfile(argv[1]) < 0) {
- X perror(argv[1]);
- X exit(1);
- X }
- X
- X /*
- X * Convert each resource of type "FONT".
- X */
- X nfonts = countresources("FONT");
- X for (index=1; index <= nfonts; index++) {
- X if ((res = getindresource("FONT", index))) {
- X convert(res);
- X releaseresource(res);
- X }
- X }
- X exit(0);
- X}
- X
- Xconvert(res)
- Xchar **res;
- X{
- X struct fontrec {
- X short fonttype;
- X short firstchar;
- X short lastchar;
- X short widmax;
- X short kernmax;
- X short ndescent;
- X short frectwidth;
- X short frectheight;
- X short owtloc;
- X short ascent;
- X short descent;
- X short leading;
- X short rowwords;
- X short bitimage[1];
- X };
- X register short *ip;
- X register char *cp;
- X register int fd, i;
- X register struct dispatch *d;
- X register short *loctable, *owtable;
- X char dig[6];
- X auto int id, id0;
- X char **res0;
- X char fname[256], type[4];
- X struct fontrec *fr;
- X char *glyph;
- X unsigned long reslen;
- X struct header vfhdr;
- X struct dispatch vfdis[NUM_DISPATCH];
- X
- X /*
- X * Find the resource corresponding to font size 0. The name of
- X * that resource is the font name.
- X */
- X reslen = sizeresource(res);
- X getresinfo(res, &id, type, fname);
- X if (reslen == 0 || (id & 0177) == 0)
- X return;
- X if (!(res0 = getresource("FONT", id&~0177)))
- X return;
- X getresinfo(res0, &id0, type, fname);
- X releaseresource(res0);
- X if (fname[0]) {
- X for (cp=fname; *cp; cp++)
- X if (isspace(*cp))
- X *cp = '_';
- X else if (isupper(*cp))
- X *cp = tolower(*cp);
- X } else
- X return;
- X
- X /*
- X * Find the location table and offset/width table.
- X */
- X fr = (struct fontrec *)*res;
- X i = sizeof(struct fontrec) / sizeof(short) - 1;
- X for (ip=(short *)fr; --i >= 0; ip++)
- X *ip = ntohs(*ip);
- X ip += fr->rowwords*fr->frectheight; /* skip bit image */
- X loctable = ip - fr->firstchar; /* index from firstchar, not 0 */
- X owtable = loctable + (fr->lastchar - fr->firstchar + 3);
- X for (i = 2*(fr->lastchar - fr->firstchar + 3); --i > 0; ip++)
- X *ip = ntohs(*ip);
- X if (fr->lastchar >= NUM_DISPATCH)
- X fr->lastchar = NUM_DISPATCH - 1;
- X
- X /*
- X * Form the output filename (base name + font size) and create
- X * the output file.
- X */
- X cp = dig + sizeof dig - 1;
- X *cp = '\0';
- X i = id & 0177;
- X do {
- X *--cp = "0123456789"[i%10];
- X i /= 10;
- X } while (cp > dig && i);
- X (void)strncat(fname, ".", sizeof fname - 1);
- X (void)strncat(fname, cp, sizeof fname - 1);
- X fname[sizeof fname - 1] = '\0';
- X if ((fd = creat(fname, 0644)) < 0) {
- X perror(fname);
- X return;
- X }
- X
- X /*
- X * Create the vfont header.
- X */
- X vfhdr.magic = VFONT_MAGIC;
- X vfhdr.maxx = fr->widmax;
- X vfhdr.maxy = fr->ascent + fr->descent;
- X vfhdr.size = (fr->lastchar-fr->firstchar+1)*vfhdr.maxy*((vfhdr.maxx+7)/8);
- X vfhdr.xtend = 0;
- X
- X /*
- X * Allocate space for the font. Not all of this space will be used,
- X * since most characters are narrower than "widmax".
- X */
- X if (!(glyph=malloc((unsigned)vfhdr.size))) {
- X perror("malloc");
- X (void)close(fd);
- X return;
- X }
- X
- X /*
- X * Extract the glyphs one by one. Create zero-width entries for
- X * missing glyphs. Don't bother filling in the missing character
- X * symbol.
- X */
- X cp = glyph + vfhdr.size;
- X while (cp > glyph)
- X *--cp = 0;
- X for (i=0,d=vfdis; i < fr->firstchar; i++,d++) {
- X d->addr = 0;
- X d->nbytes = 0;
- X d->up = 0;
- X d->down = 0;
- X d->left = 0;
- X d->right = 0;
- X d->width = 0;
- X }
- X for ( ; i <= fr->lastchar; i++,d++) {
- X if (owtable[i] == -1) {
- X d->addr = 0;
- X d->nbytes = 0;
- X d->up = 0;
- X d->down = 0;
- X d->left = 0;
- X d->right = 0;
- X d->width = 0;
- X } else {
- X d->addr = cp - glyph;
- X d->up = fr->ascent;
- X d->down = fr->descent;
- X d->left = -((owtable[i]>>8)&0377) - fr->kernmax;
- X d->right = (owtable[i]&0377) - d->left;
- X if ((unsigned)d->left+(unsigned)d->right > fr->widmax) {
- X /* font incorrectly formatted, take a guess */
- X d->left = fr->kernmax;
- X d->right = fr->widmax - d->left;
- X }
- X d->width = (owtable[i]&0377);
- X d->nbytes = ((d->left + d->right+7)/8)*fr->frectheight;
- X extract(cp, (char *)fr->bitimage, loctable[i],
- X loctable[i+1] - loctable[i],
- X fr->frectheight, fr->rowwords*2, d->nbytes/fr->frectheight);
- X cp += d->nbytes;
- X }
- X }
- X for ( ; i < NUM_DISPATCH; i++,d++) {
- X d->addr = 0;
- X d->nbytes = 0;
- X d->up = 0;
- X d->down = 0;
- X d->left = 0;
- X d->right = 0;
- X d->width = 0;
- X }
- X
- X /*
- X * Recompute "vfhdr.size" based upon the actual amount of memory
- X * used. Write the header, dispatch table, and glyphs. Close the
- X * output file and free the memory that was malloc()ed.
- X */
- X vfhdr.size = cp-glyph; /* use actual size */
- X
- X if (write(fd, (char *)&vfhdr, SZ_VFHDR) != SZ_VFHDR ||
- X write(fd, (char *)vfdis, sizeof vfdis) != sizeof vfdis ||
- X write(fd, glyph, cp-glyph) != cp-glyph)
- X perror(fname);
- X (void)close(fd);
- X free(glyph);
- X}
- X
- Xextract(glyphp, bitimage, pos, wid, frh, rowlen, colbytes)
- Xregister char *glyphp;
- Xchar *bitimage;
- X{
- X register char *byte;
- X register int width, bitidx;
- X int row;
- X
- X /*
- X * Extract the character in "bitimage" with bit width "wid"
- X * and rectangle height "frh" into "glyphp". "rowlen" is
- X * the length of rows in the source bit image.
- X */
- X for (row=0; row < frh; row++) {
- X width = wid;
- X byte = bitimage + row*rowlen + pos/8;
- X bitidx = pos%8;
- X while (width > 0) {
- X *glyphp++ = ((byte[0]&0377) << bitidx) |
- X ((byte[1]&0377) >> (8-bitidx));
- X byte++;
- X width -= 8;
- X
- X }
- X if (width < 0)
- X glyphp[-1] &= (0377 << -width);
- X glyphp += colbytes - (wid+7)/8;
- X }
- X}
- !EOF!fontcvt.c!
- echo x - resmgr.c
- sed -e 's/^X//' > resmgr.c << '!EOF!resmgr.c!'
- X/*
- X * quick-and-dirty resource manager routines
- X *
- X * This file provides a set of routines which can open a resource file
- X * and perform some of the services of the Macintosh Resource Manager.
- X * The calling sequences are the same as those in *Inside Macintosh*.
- X * There is no attempt to provide read/write access to resource files
- X * (since that is considerably more complicated).
- X *
- X * Two "tricks" were used in the coding of these routines. First, since
- X * the Macintosh uses a 68000, its byte order is the same as the Internet
- X * network byte order. The routines "ntohs" and "ntohl", intended to
- X * convert network byte-ordered shorts and longs to native host shorts and
- X * longs, are used to convert between Macintosh byte ordering and native
- X * host byte ordering. Second, the "get*resource" routines are supposed
- X * to return a "handle" to a resource. They actually return a pointer
- X * to a structure containing information about the resource; the first
- X * element of that structure is a pointer to the resource. This extra
- X * information is invisible to the caller (which can treat the returned
- X * value as a "handle").
- X *
- X * --John Bruner (27-May-86)
- X */
- X
- X#include <sys/types.h>
- X#include <sys/file.h>
- X#include <netinet/in.h>
- X#include <strings.h>
- X#include <errno.h>
- X
- Xstruct reshdr {
- X u_long rh_doff; /* offset to resource data */
- X u_long rh_moff; /* offset to resource map */
- X u_long rh_dlen; /* length of resource data */
- X u_long rh_mlen; /* length of resource map */
- X};
- X
- Xstruct rmaphdr {
- X char rmh_rsrv[22]; /* (reserved for internal use) */
- X short rmh_attr; /* resource file attributes */
- X u_short rmh_toff; /* offset to type list */
- X u_short rmh_noff; /* offset to name list */
- X};
- X
- Xstruct typehdr {
- X short th_ntypes; /* number of types - 1 */
- X};
- X
- Xstruct typeinfo {
- X char ti_type[4]; /* resource type */
- X short ti_nres; /* number of resources of this type - 1 */
- X u_short ti_roff; /* offset to reference list */
- X};
- X
- Xstruct refinfo {
- X short ri_id; /* resource ID */
- X u_short ri_noff; /* offset to name (from rmh_noff) */
- X unsigned ri_attr:8, /* resource attributes */
- X ri_doff:24; /* offset to resource */
- X long ri_handle; /* (reserved) */
- X};
- X
- Xstruct name {
- X char nam_len; /* length */
- X char nam_name[1]; /* string of length "nam_len" */
- X};
- X
- Xstruct reshandle {
- X char *h_res; /* pointer to resource data */
- X struct refinfo *h_refi; /* reference information */
- X struct typeinfo *h_typei; /* type information */
- X u_long h_len; /* resource length */
- X};
- X
- Xstatic int resfile = -1;
- Xstatic struct reshdr reshdr; /* resource header */
- Xstatic char *resmap; /* resource map */
- Xstatic struct rmaphdr *rmaphdr;
- Xstatic struct typehdr *typehdr;
- Xstatic struct typeinfo *typeinfo;
- X
- Xextern int errno;
- Xextern char *malloc();
- Xextern u_long ntoh3();
- Xextern long lseek();
- X
- Xopenresfile(fname)
- Xchar *fname;
- X{
- X register struct typeinfo *ti;
- X register struct refinfo *ri;
- X register int i;
- X
- X /*
- X * Open a resource file if one is not already open. No provision
- X * is made for having more than one file open at a time. Read
- X * in the various resource mapping structures.
- X */
- X if (resfile >= 0) {
- X errno = EEXIST; /* not even close to being correct */
- X return(-1);
- X }
- X if ((resfile = open(fname, O_RDONLY)) < 0)
- X return(-1);
- X
- X /*
- X * Read the resource header.
- X */
- X if (read(resfile, (char *)&reshdr, sizeof reshdr) != sizeof reshdr) {
- X (void)closeresfile();
- X return(-1);
- X }
- X reshdr.rh_doff = ntohl(reshdr.rh_doff);
- X reshdr.rh_moff = ntohl(reshdr.rh_moff);
- X reshdr.rh_dlen = ntohl(reshdr.rh_dlen);
- X reshdr.rh_mlen = ntohl(reshdr.rh_mlen);
- X
- X /*
- X * Read the resource map.
- X */
- X if (!(resmap = malloc((unsigned)reshdr.rh_mlen))) {
- X (void)closeresfile();
- X return(-1);
- X }
- X if (lseek(resfile, (long)reshdr.rh_moff, L_SET) != reshdr.rh_moff ||
- X read(resfile, resmap, (int)reshdr.rh_mlen) != reshdr.rh_mlen) {
- X (void)closeresfile();
- X resfile = -1;
- X return(-1);
- X }
- X rmaphdr = (struct rmaphdr *)resmap;
- X rmaphdr->rmh_attr = ntohs((short)rmaphdr->rmh_attr);
- X rmaphdr->rmh_toff = ntohs((short)rmaphdr->rmh_toff);
- X rmaphdr->rmh_noff = ntohs((short)rmaphdr->rmh_noff);
- X
- X typehdr = (struct typehdr *)(resmap + rmaphdr->rmh_toff);
- X typehdr->th_ntypes = ntohs(typehdr->th_ntypes);
- X typeinfo = (struct typeinfo *)(resmap + rmaphdr->rmh_toff +
- X sizeof typehdr->th_ntypes);
- X ti = typeinfo + (typehdr->th_ntypes+1);
- X while (--ti >= typeinfo) {
- X ti->ti_nres = ntohs(ti->ti_nres);
- X ti->ti_roff = ntohs((short)ti->ti_roff);
- X ri = (struct refinfo *)((char *)typehdr + ti->ti_roff);
- X for (i = 0; i <= ti->ti_nres; i++, ri++) {
- X ri->ri_id = ntohs(ri->ri_id);
- X ri->ri_noff = ntohs((short)ri->ri_noff);
- X ri->ri_doff = ntoh3((u_long)ri->ri_doff);
- X }
- X }
- X
- X /*
- X * Everything is OK -- return 0 (success).
- X */
- X return(0);
- X}
- X
- Xcloseresfile()
- X{
- X /*
- X * Close the current resource file and deallocate the memory
- X * we were using for its resource map.
- X */
- X if (resfile > 0) {
- X (void)close(resfile);
- X if (resmap)
- X free((char *)resmap);
- X return(0);
- X } else
- X return(-1);
- X}
- X
- Xcounttypes()
- X{
- X /*
- X * Count the number of types in the resource file.
- X */
- X if (resfile < 0) {
- X errno = ENXIO; /* another bogus error code */
- X return(-1);
- X }
- X return(typehdr->th_ntypes+1);
- X}
- X
- Xgetindtype(type, index)
- Xchar type[4];
- X{
- X /*
- X * Get the resource type associated with the specified type index.
- X */
- X if (resfile < 0) {
- X errno = ENXIO;
- X return(-1);
- X }
- X if (--index >= 0 && index <= typehdr->th_ntypes) {
- X (void)strncpy(type, typeinfo[index].ti_type, 4);
- X } else
- X (void)strncpy(type, "", 4);
- X return(0);
- X}
- X
- Xcountresources(type)
- Xchar type[4];
- X{
- X register struct typeinfo *ti;
- X
- X /*
- X * Return the number of resources of the specified type.
- X */
- X ti = typeinfo + (typehdr->th_ntypes+2);
- X while (--ti >= typeinfo) {
- X if (strncmp(type, ti->ti_type, 4) == 0)
- X return(ti->ti_nres+1);
- X }
- X return(0);
- X}
- X
- Xstatic
- Xchar **
- Xgetres(ri, ti)
- Xstruct refinfo *ri;
- Xstruct typeinfo *ti;
- X{
- X register long offset;
- X register char *res;
- X register struct reshandle *resh;
- X auto u_long len;
- X
- X /*
- X * Return a handle to a resource whose reference info is "ri" and
- X * whose type info is "ti". This routine is used internally and
- X * should not be called directly.
- X */
- X offset = reshdr.rh_doff + ri->ri_doff;
- X if (lseek(resfile, offset, L_SET) == offset &&
- X read(resfile, (char *)&len, sizeof len) == sizeof len &&
- X (len = ntohl(len) , (res = malloc((unsigned)len)))) {
- X if (!len || read(resfile, res, (int)len) == len) {
- X if ((resh = (struct reshandle *)malloc(sizeof(struct reshandle)))) {
- X resh->h_res = res;
- X resh->h_refi = ri;
- X resh->h_typei = ti;
- X resh->h_len = len;
- X return((char **)resh);
- X } else {
- X free(res);
- X return((char **)0);
- X }
- X } else {
- X free((char *)res);
- X return((char **)0);
- X }
- X } else
- X return((char **)0);
- X}
- X
- Xstruct typeinfo *
- Xgettypei(type)
- Xchar type[4];
- X{
- X register struct typeinfo *ti;
- X
- X /*
- X * Get the type information associated with the named type.
- X */
- X for (ti=typeinfo; ti < typeinfo+typehdr->th_ntypes+2; ti++)
- X if (strncmp(type, ti->ti_type, 4) == 0)
- X return(ti);
- X return((struct typeinfo *)0);
- X}
- X
- Xchar **
- Xgetindresource(type, index)
- Xchar type[4];
- X{
- X register struct typeinfo *ti;
- X register struct refinfo *ri;
- X
- X /*
- X * Get the resource (a "handle" is returned) whose type is "type"
- X * and whose index is "index".
- X */
- X if ((ti = gettypei(type)) != (struct typeinfo *)0) {
- X ri = (struct refinfo *)((char *)typehdr + ti->ti_roff);
- X if (--index >= 0 && index <= ti->ti_nres)
- X return(getres(ri + index, ti));
- X else
- X return((char **)0);
- X } else
- X return((char **)0);
- X}
- X
- Xchar **
- Xgetresource(type, id)
- Xchar type[4];
- X{
- X register struct typeinfo *ti;
- X register struct refinfo *ri;
- X register int i;
- X
- X /*
- X * Get the resource (a "handle" is returned) with type "type" and
- X * resource ID "id".
- X */
- X if ((ti = gettypei(type)) != (struct typeinfo *)0) {
- X ri = (struct refinfo *)((char *)typehdr + ti->ti_roff);
- X for (i=0; i <= ti->ti_nres; i++,ri++) {
- X if (ri->ri_id == id)
- X return(getres(ri, ti));
- X }
- X }
- X return((char **)0);
- X}
- X
- Xchar **
- Xgetnamedresource(type, name)
- Xchar type[4];
- Xchar *name;
- X{
- X register struct typeinfo *ti;
- X register struct refinfo *ri;
- X register struct name *n;
- X register char *nbase;
- X register int i;
- X
- X /*
- X * Get the resource (a "handle" is returned) whose type is "type"
- X * and whose name is "name".
- X */
- X if ((ti = gettypei(type)) != (struct typeinfo *)0) {
- X ri = (struct refinfo *)((char *)typehdr + ti->ti_roff);
- X nbase = (char *)rmaphdr + rmaphdr->rmh_noff;
- X for (i=0; i <= ti->ti_nres; i++,ri++) {
- X if ((short)ri->ri_noff != -1) {
- X n = (struct name *)(nbase + ri->ri_noff);
- X if (strlen(name) == n->nam_len &&
- X strncmp(name, n->nam_name, n->nam_len) == 0)
- X return(getres(ri, ti));
- X }
- X }
- X }
- X return((char **)0);
- X}
- X
- Xreleaseresource(res)
- Xchar **res;
- X{
- X /*
- X * Free the resource whose handle is "res". Deallocate the memory
- X * that it occupies.
- X */
- X free(*res);
- X free((char *)res);
- X}
- X
- Xu_long
- Xsizeresource(res)
- Xchar **res;
- X{
- X return(((struct reshandle *)res)->h_len);
- X}
- X
- Xgetresinfo(res, id, type, name)
- Xchar **res;
- Xint *id;
- Xchar type[4];
- Xchar *name;
- X{
- X register struct reshandle *resh;
- X register struct refinfo *ri;
- X register struct name *nam;
- X
- X /*
- X * Get the resource information associated with "res" (a handle).
- X */
- X resh = (struct reshandle *)res;
- X ri = resh->h_refi;
- X *id = ri->ri_id;
- X (void)strncpy(type, resh->h_typei->ti_type, 4);
- X if ((short)ri->ri_noff != -1) {
- X nam = (struct name *)((char *)rmaphdr + rmaphdr->rmh_noff + ri->ri_noff);
- X (void)strncpy(name, nam->nam_name, nam->nam_len);
- X name[nam->nam_len] = '\0';
- X } else
- X *name = '\0';
- X}
- X
- Xu_long
- Xntoh3(i)
- Xu_long i;
- X{
- X /*
- X * Try to convert a 3-byte quantity. This routine assumes that
- X * the bytes come from bytes (1,2,3) of (0,1,2,3) or from bytes
- X * (3,2,1) of (3,2,1,0).
- X *
- X * The PDP-11 has a weird byte order for longs, and this routine
- X * will certainly fail there.
- X */
- X if (ntohl(i) == i) /* big-endian */
- X return(i);
- X else /* little-endian */
- X return(ntohl(i<<8));
- X}
- !EOF!resmgr.c!
- exit 0
- : end of shell archive
-